<div class="hope">
<div id="tabs">
	<ul>
		<li><a href="#aggregator">Aggregator</a></li>
		<li><a href="#godspeak">God Speak</a></li>
		<li><a href="#flickr">Flickr</a></li>
	</ul>
	<div id="aggregator">
		<div class="aggregator">
			
			<form method="POST" action="<?php echo admin_url('admin-ajax.php'); ?>" id="aggregator_form">
				<input type="hidden" name="action" value="world_view" />
				<label>Input the site url : </label>
				<input name="site_url" type="text" value="<?php ?>" />
				
				<label>Input the Rss url : </label>
				<input name="rss_url" type="text" value="<?php ?>" />
				<label>Maximum : </label>
				<input name="maximum" type="text" value="<?php ?>" />
				<input type="submit" value="Aggregator" />
			</form>
			<div id="aggregator_result"></div>
		</div>
	</div>
	<div id="godspeak">
		<form name="god_speak" action="" method="POST">
		<?php
			$god_speak = unserialize(get_option('god_speak',true));
			if(isset($_POST['addaction'])) : 
			foreach($god_speak as $key =>$value) : 
				$god_speak[$key] = array(
						'content'=>$_POST[$key."content"],
						'title'=>$_POST[$key."title"]
				);
			endforeach;
			if($_POST['addnew_content'] || $_POST['addnewtitle']){
				$god_speak[] = array(
										'content' => $_POST['addnew_content'],
										'title' => $_POST['addnewtitle']
									);
			}
			$god_speak_store = serialize($god_speak);		
			
			update_option('god_speak',$god_speak_store);	
			
			endif;
			
			
			if($god_speak) : 
				foreach($god_speak as $key => $value) : 
				?>
				<p><textarea name="<?php echo $key."content" ;?>"><?php echo $value['content'] ; ?></textarea></p>
				<p><input type="text" value="<?php echo $value['title'] ; ?>" name="<?php echo $key."title" ;?>"/></p>
				<?php
				endforeach;
			endif;
		?>
		<label>
		enter content : 
		<textarea name="addnew_content"></textarea>
		</label>
		<label>
		enter text bellow
		<input name="addnewtitle" value="" type="text"/>
		</label>
		<input type="submit" value="Update" name="addaction" />
		</form>
	</div>
	<div id="flickr">
		<form method="post" action="">
		<label>Enter your Flickr ID</label>
		<input type="text" value="<?php echo get_option( 'flickr_id',true) ; ?>" name="flickr_id" />
		<input type="submit" value="save" name="save_flickr" />
		</form>
		<?php if( isset($_POST['save_flickr'])) update_option( 'flickr_id', $_POST['flickr_id']) ; ?>
	</div>
</div>
</div>
<script type="text/javascript">
	jQuery(function() {
		jQuery( "#tabs" ).tabs();
	});
</script>